@import "./var.scss";

.common-order-page {
  .product {
    position: relative;
    width: 860px;
    margin: 0 0 15px 0;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
  }
  .product-calendar,
  .product-entry,
  .product-fill {
    padding: 20px 30px;
    position: relative;
    border-bottom: 1px dashed #e1e1e1;
  }
  .product-tip {
    overflow: hidden;
    padding: 15px;
    margin: 20px 0 10px;
    color: #666;
    font-size: 12px;
    border-radius: 3px;
    background: #fffef6;
    border: 1px solid #f5f4f1;
    & > span {
      span {
        color: $mainColor;
      }
    }
    p {
      float: right;
      width: 690px;
      text-align: left;
    }
  }
  // 产品信息
  .product-info {
    padding: 20px 30px;
    border-bottom: 1px solid #e1e1e1;
    h1 {
      font-size: 22px;
      font-weight: 400px;
      color: #333;
    }
    h3 {
      margin-top: 10px;
      font-size: 18px;
    }
  }
  // 横排日历
  .product-calendar {
    padding-top: 30px;
    ul {
      overflow: hidden;
    }
    li {
      float: left;
      width: 90px;
      padding: 10px 0;
      text-align: center;
      border: 1px solid #909090;
      border-radius: 2px;
      color: #666;
      cursor: pointer;
      user-select: none;
      & + li {
        margin-left: 11px;
      }
      & > p {
        width: 100%;
      }
      & > span {
        font-size: 12px;
      }
      &.more-date {
        position: relative;
        padding: 0;
        overflow: hidden;
        font-size: 0;
        & > span {
          display: block;
          height: 100%;
          line-height: 64px;
          font-size: 16px;
        }
        & > div {
          height: 105%;
          position: absolute;
          left: -1px;
          bottom: -1px;
          top: -1px;
          right: -1px;
          opacity: 0;
          filter: opacity(0);
        }
        input:hover {
          cursor: pointer;
        }
      }
      &:hover {
        border-color: $mainColor;
        color: $mainColor;
      }
      &.selected {
        color: #fff;
        background-color: $mainColor;
        border-color: $mainColor;
      }
      &.disabled {
        color: #bbb;
        border-color: #ddd;
        &:hover {
          cursor: not-allowed;
        }
      }
    }
    & > p {
      text-align: right;
      span {
        color: #888;
      }
    }
    .hotel-calendar {
      padding-bottom: 10px;
      overflow: hidden;
      span {
        line-height: 34px;
      }
      em {
        display: inline-block;
        width: 20px;
        text-align: center;
      }
      .date {
        font-size: 18px;
        font-weight: bold;
        color: $mainColor;
      }
      .more-date {
        float: right;
        position: relative;
        display: inline-block;
        width: 90px;
        line-height: 32px;
        overflow: hidden;
        border: 1px solid #909090;
        border-radius: 2px;
        span{
          display: block;
          text-align: center;
          color: #666;
          font-size: 14px;
          background-color: #fff;
        } 
        div{
          width: 205%;
          height: 100%;
          position: absolute;
          left: 0;
          top: 0;
          opacity: 0;
          filter: opacity(0);
          &>div{
            display: none;
            &:first-of-type{
              display: block;
            }
          }
        }
        input{
          width: 100%;
          height: 100%;
          &:hover {
            cursor: pointer;
          }
        }
        &:hover{
          cursor: pointer;
          border-color: $mainColor;
          span{
            color: $mainColor;
          }
        }
      }
    }
  }
  // 入园时段
  .product-entry {
    .product-tip {
      margin-top: 0;
    }
    .product-entry-time {
      margin-top: 20px;
      & > div {
        display: inline-block;
        color: #666;
        border: 1px solid #909090;
        border-radius: 2px;
        text-align: center;
        width: 120px;
        line-height: 40px;
        margin-right: 10px;
        user-select: none;
        &:hover {
          cursor: pointer;
          border-color: $mainColor;
          color: $mainColor;
        }
        &.selected {
          color: $mainColor;
          border-color: $mainColor;
        }
        &.disabled {
          color: #bbb;
          border-color: #ddd;
          &:hover {
            cursor: not-allowed;
          }
        }
      }
    }
  }
  // 信息输入
  .product-fill {
    border-bottom: none;
    & > * {
      margin-bottom: 15px;
    }
    .fill-tip {
      color: #999;
      font-size: 12px;
      span {
        margin-right: 3px;
        color: $mainColor;
      }
    }
    .fill-user {
      h3 {
        margin-bottom: 10px;
        font-size: 16px;
      }
      p {
        padding-left: 70px;
        color: #999;
      }
      dl {
        width: 600px;
        padding-left: 70px;
        margin-bottom: 0;
      }
      dd {
        display: table-cell;
        width: 80px;
        padding: 0 20px 6px 0;
        color: #666;
        & > span {
          margin-left: 30px;
          font-size: 16px;
          color: #999;
          &:hover {
            color: $mainColor;
            cursor: pointer;
          }
        }
      }
    }
    .fill-number,
    .fill-info {
      overflow: hidden;
      .label {
        display: inline-block;
        width: 70px;
        color: #555;
      }
      & > div,
      input {
        display: inline-block;
        width: 180px;
        &:focus {
          box-shadow: 0 0 5px 0 rgb(246 135 9 / 50%);
        }
      }
    }
    .fill-info {
      input {
        & + span {
          margin-left: 20px;
        }
      }
      textarea {
        width: 730px;
        float: right;
        & + p {
          clear: both;
          padding: 5px 0 0 80px;
          font-size: 12px;
          color: #999;
        }
      }
    }
  }
  // 确认下单
  .product-order {
    height: 54px;
    text-align: right;
    background-color: #e1e1e1;
    .title,
    .price,
    .amount,
    button {
      display: inline-block;
      float: right;
    }
    .price,
    button {
      height: 54px;
      line-height: 52px;
    }
    .title,
    .amount {
      margin-top: 21px;
      font-size: 16px;
    }
    .price {
      margin-left: 10px;
      font-size: 40px;
      color: $priceColor;
      em {
        font-size: 20px;
      }
    }
    .amount {
      margin-right: 10px;
      color: #999;
    }
    button {
      width: 312px;
      color: #fff;
      border: 1px solid #db4300;
      background: linear-gradient(0deg, $priceColor, #d5500d);
      font-size: 20px;
      padding: 0 20px;
      border-radius: 4px;
      &:hover {
        cursor: pointer;
        opacity: 0.8;
      }
      &[disabled]{
        cursor: not-allowed;
        background: #bbb;
        border-color: #bbb;
      }
    }
  }
  // 右侧固定栏
  .aside {
    width: 318px;
    position: absolute;
    right: 0;
    top: 34px;
    * {
      box-sizing: border-box;
    }
    h3 {
      font-size: 16px;
      font-weight: 400;
      line-height: 1.5;
      line-clamp: 3;
      margin: 18px 0;
      overflow: hidden;
      text-align: justify;
    }
  }
  .aside-info {
    background-color: #fff;
    padding: 0 20px;
    border-radius: 3px;
    border: 1px solid #ddd;
  }
  .aside-total,
  .aside-reduce,
  .aside-pay {
    overflow: hidden;
    padding: 0 18px;
    span {
      font-size: 16px;
    }
    em {
      float: right;
      font-family: Arial;
      font-size: 28px;
    }
    i {
      font-size: 18px;
    }
  }
  .aside-total,
  .aside-reduce {
    border-top: 1px solid #e1e1e1;
    margin: 0 -20px;
    line-height: 45px;
    span {
      color: #252525;
    }
    em {
      color: $priceColor;
    }
  }
  .aside-pay {
    color: #fff;
    margin: 0 -20px;
    line-height: 65px;
    background-color: $priceColor;
    span,
    em {
      color: #fff;
    }
  }
  .aside-kf {
    height: 74px;
    padding: 15px 20px 0;
    margin-top: 10px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 3px;
    overflow: hidden;
    .phone {
      float: right;
      margin: 0 6px;
      padding-left: 20px;
      border-left: 1px solid #ccc;
    }
    .online {
      float: left;
      position: relative;
      padding-left: 44px;
      span {
        position: absolute;
        left: -2px;
        top: -5px;
        font-size: 34px;
        color: #999;
      }
      h5 {
        margin: 0;
        color: #888;
      }
      div {
        color: $mainColor;
        &:hover {
          cursor: pointer;
          text-decoration: underline;
        }
      }
    }
  }
}

.fill-btn {
  width: 110px;
  line-height: 30px;
  color: #fff;
  border: 1px solid $mainColor;
  background-color: $mainColor;
  border-radius: 2px;
  &:hover {
    opacity: 0.8;
    cursor: pointer;
  }
  &.small{
    width: 95px;
    line-height: 26px;
  }
}
.fill-select,
.fill-form {
  width: 360px;
  h3 {
    margin: 5px 0 15px;
    font-size: 16px;
    font-weight: bold;
  }
  div > label {
    width: 80px;
  }
  button {
    margin-left: 80px;
  }
}
.fill-select {
  width: 420px;
  h3 {
    line-height: 2.2;
  }
  p {
    color: #999;
  }
  dl {
    position: relative;
    margin-bottom: 8px;
  }
  dd {
    display: table-cell;
    width: 70px;
    padding: 0 10px 6px 0;
    color: #666;
    label {
      vertical-align: 1px;
    }
    &:first-child {
      width: auto;
    }
    &:nth-child(3){
      padding-right: 20px;
    }
    &:last-child{
      position: absolute;
      right: 0;
      top: 0;
    }
    & > span {
      margin-left: 20px;
      &:hover {
        cursor: pointer;
        color: $mainColor;
      }
    }
  }
  .fill-btn {
    float: right;
    margin: 0 0 20px 0;
  }
}
// 支付弹窗
.pay-modal {
  & > div > div {
    padding: 40px 80px;
    overflow: hidden;
  }
  h3 {
    font-size: 18px;
  }
  .ewm,
  .bg {
    float: left;
  }
  .ewm {
    width: 300px;
    padding-top: 20px;
    margin-right: 40px;
    canvas {
      outline: 1px solid #eee;
    }
    p {
      padding: 8px 0 8px 130px;
      margin-top: 10px;
      color: #fff;
      background-color: #ff7674;
      line-height: 1.5;
      background-image: url("~/public/imgs/pay/pay-phone-bg-red.png");
      background-repeat: no-repeat;
      background-position: 50px 7px;
    }
  }
  .bg {
    width: 330px;
  }
}
// 支付成功
.pay-success {
  padding-top: 80px;
  .pay-result {
    div > span {
      font-size: 100px;
    }
    em {
      color: $mainColor;
      &:hover {
        cursor: pointer;
        text-decoration: underline;
      }
    }
  }
}

// 优惠券
.coupon-box{
  position: relative;
  padding: 20px 30px;
  border-top: 1px dashed #e1e1e1;
  &.collapse{
    .coupon-list{
      display: none;
    }
  }
  &.coupon-cart{
    padding: 20px;
    .coupon-list .item{
      width: 376px;
      margin: 5px 16px 0 0;
      &:nth-child(2n){
        margin-right: 16px;
      }
      &:nth-child(3n){
        margin-right: 0;
      }
      .right{
        width: 46px;
      }
    }
  }
  .title{
    position: relative;
    &>span{
      margin-left: 10px;
      font-size: 12px;
      color: #888;
      &:last-child{
        position: absolute;
        right: 0;
        top: -2px;
        font-size: 16px;
        color: $mainColor;
        &:hover{
          cursor: pointer;
          opacity: 0.8;
        }
      }
    }
  }
  .coupon-list{
    padding-top: 10px;
    .item{
      position: relative;
      display: inline-block;
      width: 380px;
      height: 100px;
      margin: 5px 40px 0 0;
      border-radius: 3px;
      overflow: hidden;
      box-shadow: 1px 1px 5px 0px rgb(0 0 0 / 10%);
      &:nth-child(2n){
        margin-right: 0;
      }
      &.disabled{
        &:hover{
          cursor: not-allowed;
        }
        .left{
          background: #ccc;
        }
        .time>span,
        .desc>span,
        .right,
        .center{
          color: #999;
        }
      }
      &.chosen{
        outline: 1px solid #647ae9;
        .right{
          &>span{
            border-color: #5596f2;
            &::before{
              display: block;
              content: '';
              width: 12px;
              height: 12px;
              margin: 5px auto 0;
              background-color: #5596f2;
              border-radius: 100%;
            }
          }
        }
      }
      &:hover{
        cursor: default;
        box-shadow: 1px 1px 5px 0px rgb(0 0 0 / 20%);
      }
      .left,
      .center,
      .right{
        float: left;
        height: 100%;
      }
      .left{
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        position: relative;
        width: 120px;
        background: linear-gradient(#5596f2,#647ae9);
        color: #fff;
        font-size: 18px;
        &::after{
          display: block;
          content: "";
          position: absolute;
          right: -4px;
          top: 3px;
          width: 0;
          height: 95px;
          border-right: 8px dotted #fff;
        }
      }
      .center{
        width: 210px;
        padding: 10px 0 10px 10px;
        color: #555;
      }
      .right{
        width: 50px;
        display: flex;
        justify-content: center;
        align-items: center;
        span{
          display: block;
          width: 24px;
          height: 24px;
          background-color: #fff;
          border-radius: 100%;
          border: 1px solid #d9d9d9;
        }
      }
      .price{
        font-size: 16px;
        &>em{
          font-size: 26px;
          font-weight: bold;
        }
        &+p{
          font-size: 12px;
          text-align: center;
        }
      }
      .time,
      .desc{
        font-size: 12px;
        &>span{
          display: inline-block;
          width: 60px;
          text-align: justify;
          text-align-last: justify;
          color: #888;
        }
      }
      .name{
        font-size: 16px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .time{
        margin: 3px 0;
      }
      .desc{
        position: relative;
        overflow: hidden;
        max-height: 32px;
        line-height: 1.3;
        padding-left: 60px;
        &>span{
          position: absolute;
          left: 0;
          top: 0;
        }
      }
    }
  }
}
.price-total-box,
.price-total-wrap{
  text-align: right;
  em, strong{
    color: $priceColor;
  }
  strong{
    font-size: 24px;
    font-weight: bold;
  }
  span{
    margin-left: 30px;
  }
}
.price-total-wrap{
  padding: 10px 20px 15px;
}